//interface 属性下面加上问号 为可选属性
interface Person {
  readonly id:number;  // readonley 为只读 ，不能赋值
  name:string;
  age?:number;
  sex?:number;
}

let muddong:Person = {
  id:1,
  name:'muddong',
  age:20
}

let xiaoming:Person = {
  id:2,
  name:"小明",
  sex:1,
}
